﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FXnaGis;

using FXnaInfrastructure;



namespace NSCore
{

    /// <summary>
    /// 所有声源的基类
    /// </summary>
    [Serializable]
    public abstract class BaseSource:FComposeShape
    {

        public BaseSource(string id,FEntityCollection timeDivides)
            : base(id)
        {


            this._timeDivides = timeDivides;

            foreach (TimeDivision item in this._timeDivides.Entities)
            {
                this.timedNoiseLevels.Add(item,new NoiseLevel());
                
            }



            




        }


        FEntityCollection _timeDivides;

     


        bool _isReference=false;

        /// <summary>
        /// 是否使用参考位置的声源
        /// </summary>
        public bool IsReference
        {
            get { return _isReference; }
            set { _isReference = value; }
        }


        double _noiseDistance=1;

        /// <summary>
        /// 表示测声距离
        /// </summary>
        public double NoiseDistance
        {
            get { return _noiseDistance; }
            set { _noiseDistance = value; }
        }



        #region 分时功率输入

        Dictionary<TimeDivision, NoiseLevel> timedNoiseLevels = new Dictionary<TimeDivision, NoiseLevel>();

        public Dictionary<TimeDivision, NoiseLevel> TimedNoiseLevels
        {
            get { return timedNoiseLevels; }
           
        }



        public void ResetTimedDivison(FEntityCollection list)
        {
            foreach (TimeDivision item in list.Entities)
            {
                


            }
        }
     


        #endregion


    }
}
